fix: preserve npm download data for scoped packages (fixes #1640)#1727
Conversation
…munity#1640) Scoped packages (starting with @) were losing their download counts because individual npm data was being overwritten during bulk merge. Now preserves existing npm data while still filling regular packages.
|
@Simek Let me know if I need to commit the updated |
Simek
left a comment
There was a problem hiding this comment.
Hey @JairajJangle, nice catch, thanks for addressing this! 👍
In the near future we plan to switch the download counts data source, which should give us way more flexibility, and would ensure more stability, than the official API that npm offers. I also hope that the switch would also remove the need of backfilling the data from the stored copy from previous fetches.
Let me know if I need to commit the updated assets/data.json and update the PR or is it something that is auto-generated in some build pipeline workflow.
The data file is generated during each website deploy. The file committed to the repository is only for development/debug purposes, so there is no urgent need to update it.
…fixes for development purposes
…nity#1727 fixes for development purposes" This reverts commit e6f7216.
📝 Why & how
Fixes #1640 - Download counts were not displaying for packages with
"@"character (scoped packages) due to npm data being overwritten during bulk query merge. Scoped packages are processed individually but their npm data was being replaced with empty objects from the bulk results.✅ Checklist